<?php
use App\Utils;
use App\Review;
use App\Permission;

if (!isset($type)) $type = 'none';
?>
<!doctype html>
<html style="height:100%;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,minimal-ui"/>
    <link href="/uploads/145620041535888.png" type="image/x-icon" rel=icon>
    <title>@yield("title")</title>
    <!--
        <link rel="stylesheet" href="/css/edit/style.css">
        <link rel="stylesheet" href="/css/edit/editormd.css">
        <link rel="stylesheet" href="/css/highlight/styles/github.css">
    -->
    @yield("edstyle")
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/bootstrap-theme.css" rel="stylesheet">
    <link href="/css/jquery.mCustomScrollbar.css" rel="stylesheet">
    <link href="/css/base.css?v=1.3" rel="stylesheet">
    <link rel="stylesheet" href="/font/iconfont.css">
    @yield("css")

    @yield("style")
   
</head>
<body class="html-margin">
<div class="q_warp" style="min-height:100%;margin-bottom:-60px;">
<header id="ql-header">
    <div class="head-warp clear">
        <div class="logo fl">
            <a href="/home" class="inline"><img src="/newqlcoder/img/logo.png" alt="logo"></a>
        </div>
        <div class="nav-list fl">
            <div class="nav-list-item fl <?php if ($type == 'tree') echo 'active';?>">
                <a href="/home">
                    技能树
                    @if(isset($tn)&&$tn!=0)
                    <span class="badge">{{$tn}}</span>
                    @endif
                </a>
            </div>
            <div class="nav-list-item fl <?php if ($type == 'topic') echo 'active';?>"><a href="/topic/index">话题 {{--<i class="new">#5</i>--}}</a></div>
            <div class="nav-list-item fl <?php if ($type == 'rank') echo 'active';?>"><a href="/rank">排行榜</a></div>
            <div class="nav-list-item fl <?php if ($type == 'help') echo 'active';?>"><a href="/help">帮助中心</a></div>
            @if(Auth::check() && Permission::user_can_review())
            @endif
            <!-- <li class=""><a href="/help#opinion"><span color="gray" style="font-size:15px;">意见反馈<span></span></span></a></li> -->
        </div>
        @if(Auth::check())
        <div class="pull-right ">
            <ul class="avator pull-right">
                <li class="dropdown">
                    <a class="dropdown-toggle pull-left" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        <img src="{{Auth::user()->avatar->url('thumb')}}" class="img-circle" alt="cinque terre">
                        <?php $cnt = Auth::user()->msgcnt; if ($cnt != 0) echo '<span class="badge">' . $cnt . '</span>';?>
                        <span class="username">{{auth::user()->name}}</span>
                        <span class="down"></span>
                    </a>
                    <!--<span class="badge s_tip">4</span>-->
                    <ul class="dropdown-menu ">
                        <li><a href="/profile/{{Utils::id2url(Auth::user()->id)}}" target="_blank"><i class="iconfont icon-home"></i>我的主页</a></li>
                        <li><a href="/u/update" target="_blank"><i class="iconfont icon-shezhi"></i>设置</a></li>
                        <li><a href="/imglib" target="_blank"><i class="iconfont icon-iconimg"></i>图片库</a></li>
                        <li><a href="/talent" target="_blank"><i class="iconfont icon-target"></i>offer</a></li>
                        <li>
                            <a href="/inbox" target="_blank">
                                <i class="iconfont icon-sixin"></i>私信
                                @if($cnt != 0)
                                {!! '<span class="badge">' . $cnt . '</span>' !!}
                                @endif
                            </a>
                        </li>
                        <!--<li role="separator" class="divider"></li>-->
                        <li><a href="/logout" target="_blank"><i class="iconfont icon-kaiguan"></i>退出</a></li>
                    </ul>
                </li>
            </ul>
        </div>
        @else
        <div class="pull-right">
            <ul class="login">
                <li><a href="/auth/login">登录</a>
                <li><a href="/auth/register">注册</a>
            </ul>
        </div>
        @endif
    </div>
</header>
@yield('content')
<div style="height:60px;"></div>
</div>
        <!-- Footer -->
<footer>
    ©2016 千里码 浙ICP备15038807号-1 联系我们:oreo@qlcoder.com
</footer>
</body>
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/base.js"></script>
@yield("js")
<script type='text/javascript'>
        var _vds = _vds || [];
        window._vds = _vds;
        (function(){
            _vds.push(['setAccountId', '80dfd8ec4495dedb']);
            (function() {
                var vds = document.createElement('script');
                vds.type='text/javascript';
                vds.async = true;
                vds.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'dn-growing.qbox.me/vds.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(vds, s);
            })();
        })();
    </script>
 <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?420590b976ac0a82d0b82a80985a3b8a";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</html>


